package com.dtx.zhuge.service;


import com.dtx.zhuge.spring.anno.Autowired;
import com.dtx.zhuge.spring.anno.Component;
import com.dtx.zhuge.spring.inter.InitializingBean;

@Component("userService")
//@Scope("prototype")
public class UserServiceImpl implements InitializingBean,UserService {

    @Autowired
    private OrderService orderService;

    private String beanName;

    private String name;

    public UserServiceImpl() {
    }

    public UserServiceImpl(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void test(){
        System.out.println(orderService);
        System.out.println(name);
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        //
        System.out.println("初始化");
    }
}
